home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 1.iso / desktop / att32all.zip / ALLTHETI.FRM < prev    next >
Text File  |  1994-10-14  |  20KB  |  699 lines

  1. VERSION 2.00
  2. Begin Form AllTheTime 
  3.    AutoRedraw      =   -1  'True
  4.    BackColor       =   &H00C0C0C0&
  5.    BorderStyle     =   0  'None
  6.    Caption         =   "AllTheTime"
  7.    ClientHeight    =   0
  8.    ClientLeft      =   60
  9.    ClientTop       =   330
  10.    ClientWidth     =   810
  11.    ClipControls    =   0   'False
  12.    ControlBox      =   0   'False
  13.    FillColor       =   &H00C0C0C0&
  14.    FillStyle       =   0  'Solid
  15.    FontBold        =   0   'False
  16.    FontItalic      =   0   'False
  17.    FontName        =   "MS Sans Serif"
  18.    FontSize        =   8.25
  19.    FontStrikethru  =   0   'False
  20.    FontUnderline   =   0   'False
  21.    Height          =   435
  22.    Icon            =   ALLTHETI.FRX:0000
  23.    Left            =   -15
  24.    LinkTopic       =   "Form2"
  25.    MaxButton       =   0   'False
  26.    MinButton       =   0   'False
  27.    ScaleHeight     =   0
  28.    ScaleWidth      =   810
  29.    Top             =   -30
  30.    Visible         =   0   'False
  31.    Width           =   960
  32.    Begin TextBox Text1 
  33.       Height          =   288
  34.       Left            =   2016
  35.       LinkTimeout     =   -1
  36.       TabIndex        =   5
  37.       Top             =   624
  38.       Visible         =   0   'False
  39.       Width           =   372
  40.    End
  41.    Begin PictureClip MoonSun 
  42.       Cols            =   5
  43.       Location        =   "1200,2400,2250,5430"
  44.       Picture         =   ALLTHETI.FRX:0302
  45.       Rows            =   10
  46.    End
  47.    Begin SSFrame Frame3D1 
  48.       ForeColor       =   &H00000000&
  49.       Height          =   195
  50.       Left            =   15
  51.       TabIndex        =   4
  52.       Top             =   8160
  53.       Width           =   135
  54.       Begin SSOption Option3D1 
  55.          Alignment       =   1  'Right Justify
  56.          Caption         =   "&3 - Bottom right"
  57.          ForeColor       =   &H00000000&
  58.          Height          =   255
  59.          Index           =   2
  60.          Left            =   1920
  61.          TabIndex        =   2
  62.          Top             =   960
  63.          Value           =   -1  'True
  64.          Width           =   1575
  65.       End
  66.       Begin SSOption Option3D1 
  67.          Caption         =   "&5 - Elsewhere"
  68.          ForeColor       =   &H00000000&
  69.          Height          =   255
  70.          Index           =   4
  71.          Left            =   1530
  72.          TabIndex        =   6
  73.          TabStop         =   0   'False
  74.          Top             =   615
  75.          Width           =   1575
  76.       End
  77.       Begin SSOption Option3D1 
  78.          Caption         =   "&1 - Upper left"
  79.          ForeColor       =   &H00000000&
  80.          Height          =   255
  81.          Index           =   0
  82.          Left            =   105
  83.          TabIndex        =   0
  84.          TabStop         =   0   'False
  85.          Top             =   255
  86.          Width           =   1455
  87.       End
  88.       Begin SSOption Option3D1 
  89.          Alignment       =   1  'Right Justify
  90.          Caption         =   "&2 - Upper right"
  91.          ForeColor       =   &H00000000&
  92.          Height          =   255
  93.          Index           =   1
  94.          Left            =   1920
  95.          TabIndex        =   1
  96.          TabStop         =   0   'False
  97.          Top             =   270
  98.          Width           =   1575
  99.       End
  100.       Begin SSOption Option3D1 
  101.          Caption         =   "&4 - Bottom left"
  102.          ForeColor       =   &H00000000&
  103.          Height          =   255
  104.          Index           =   3
  105.          Left            =   120
  106.          TabIndex        =   3
  107.          TabStop         =   0   'False
  108.          Top             =   960
  109.          Width           =   1575
  110.       End
  111.    End
  112.    Begin Image Delta 
  113.       Height          =   195
  114.       Left            =   795
  115.       Top             =   30
  116.       Width           =   195
  117.    End
  118.    Begin Image StopWatch 
  119.       Height          =   195
  120.       Left            =   570
  121.       Top             =   30
  122.       Width           =   195
  123.    End
  124.    Begin Image PrtStatus 
  125.       Height          =   240
  126.       Left            =   510
  127.       Top             =   10005
  128.       Width           =   300
  129.    End
  130.    Begin Image PrtInactive 
  131.       Height          =   240
  132.       Left            =   510
  133.       Top             =   10080
  134.       Width           =   285
  135.    End
  136.    Begin Image PrtActive 
  137.       Height          =   240
  138.       Left            =   510
  139.       Top             =   10080
  140.       Width           =   300
  141.    End
  142.    Begin Image Picture1 
  143.       Height          =   225
  144.       Left            =   30
  145.       Top             =   30
  146.       Width           =   240
  147.    End
  148.    Begin Image MoonPic 
  149.       Height          =   192
  150.       Left            =   300
  151.       Top             =   30
  152.       Width           =   192
  153.    End
  154.    Begin Image SeasonPic 
  155.       Height          =   192
  156.       Left            =   4080
  157.       Top             =   30
  158.       Width           =   192
  159.    End
  160. End
  161. 'DefInt A-Z
  162. Const GroupFauxCompilerDirective = False
  163.  
  164. Sub Delta_Click ()
  165. SoundABorted = True
  166. End Sub
  167.  
  168. Sub Delta_DblClick ()
  169. SoundABorted = True
  170. 'DblCFlag% = True
  171.  
  172. End Sub
  173.  
  174. Sub Delta_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  175. 'Delta.Picture = MoonSun.GraphicCell(46)
  176. Call Form_MouseDown(Button, Shift, X, Y)
  177. If Button = 1 Then 'Left button
  178.    If gDeltaRunning = 2 Then
  179.       'start timer
  180.       gResUser = GetFreeSystemResources(2) - (gStoppedResUser - gResUser)
  181.       gResGDI = GetFreeSystemResources(1) - (gStoppedResGDI - gResGDI)
  182.       gRes = GetFreeSystemResources(0) - (gStoppedRes - gRes)
  183.       gTotMem = GetTotalMem() - (gStoppedTotMem - gTotMem)
  184.       gBlkMem = GetBlockMem() - (gStoppedBlkMem - gBlkMem)
  185.       Delta.Picture = MoonSun.GraphicCell(47)
  186.       LastTime& = 0
  187.       'FontChangedNotYetSized = True
  188.       gDeltaRunning = 1
  189.    Else
  190.       'stop timer
  191.       gStoppedResUser = GetFreeSystemResources(2)
  192.       gStoppedResGDI = GetFreeSystemResources(1)
  193.       gStoppedRes = GetFreeSystemResources(0)
  194.       gStoppedTotMem = GetTotalMem()
  195.       gStoppedBlkMem = GetBlockMem()
  196.       LastTime& = 0
  197.       Delta.Picture = MoonSun.GraphicCell(48)
  198.       gDeltaRunning = 2
  199.    End If
  200. End If
  201. If Button = 2 Then
  202.       gResUser = GetFreeSystemResources(2)
  203.       gResGDI = GetFreeSystemResources(1)
  204.       gRes = GetFreeSystemResources(0)
  205.       gTotMem = GetTotalMem()
  206.       gBlkMem = GetBlockMem()
  207.       gStoppedResUser = GetFreeSystemResources(2)
  208.       gStoppedResGDI = GetFreeSystemResources(1)
  209.       gStoppedRes = GetFreeSystemResources(0)
  210.       gStoppedTotMem = GetTotalMem()
  211.       gStoppedBlkMem = GetBlockMem()
  212.       LastTime& = 0
  213. End If
  214.  
  215.  
  216. Exit Sub
  217.  
  218. If (gDeltaRunning = 0) Or (gDeltaRunning = 2 And Button = 2) Then
  219.    If (gDeltaRunning = 0) Then
  220.       gResUser = GetFreeSystemResources(2)
  221.       gResGDI = GetFreeSystemResources(1)
  222.       gRes = GetFreeSystemResources(0)
  223.       gTotMem = GetTotalMem()
  224.       gBlkMem = GetBlockMem()
  225.    Else
  226.       gResUser = GetFreeSystemResources(2) - (gStoppedResUser - gResUser)
  227.       gResGDI = GetFreeSystemResources(1) - (gStoppedResGDI - gResGDI)
  228.       gRes = GetFreeSystemResources(0) - (gStoppedRes - gRes)
  229.       gTotMem = GetTotalMem() - (gStoppedTotMem - gTotMem)
  230.       gBlkMem = GetBlockMem() - (gStoppedBlkMem - gBlkMem)
  231.    End If
  232.    gDeltaRunning = 1
  233.    Delta.Picture = MoonSun.GraphicCell(47)
  234.    LastTime& = 0
  235. Else
  236.    If gDeltaRunning = 1 Then
  237.       gDeltaRunning = 2
  238.       gStoppedResUser = GetFreeSystemResources(2)
  239.       gStoppedResGDI = GetFreeSystemResources(1)
  240.       gStoppedRes = GetFreeSystemResources(0)
  241.       gStoppedTotMem = GetTotalMem()
  242.       gStoppedBlkMem = GetBlockMem()
  243.       LastTime& = 0
  244.       Delta.Picture = MoonSun.GraphicCell(48)
  245.    Else
  246.       Delta.Picture = MoonSun.GraphicCell(45)
  247.       gDeltaRunning = 0
  248.       gResUser = 0
  249.       gResGDI = 0
  250.       gRes = 0
  251.       gTotMem = 0
  252.       gBlkMem = 0
  253.       LastTime& = 0
  254.    End If
  255. End If
  256.  
  257.  
  258. End Sub
  259.  
  260. Sub Delta_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  261. Call Form_MouseMove(Button, Shift, X, Y)
  262. End Sub
  263.  
  264. Sub Delta_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  265. Call Form_MouseUp(Button, Shift, X, Y)
  266. End Sub
  267.  
  268. Sub Form_Activate ()
  269.     'MsgBox ("Activate...")
  270.       If AllTheTime.Left >= Screen.Width - 15 Then
  271.          AllTheTime.Left = AllTheTime.Tag
  272.       End If
  273. End Sub
  274.  
  275. '
  276. '
  277. Sub Form_Click ()
  278. SoundABorted = True
  279. CFlag% = True
  280. End Sub
  281.  
  282. Sub Form_DblClick ()
  283. DblCFlag% = True
  284. End Sub
  285.  
  286. Sub Form_GotFocus ()
  287.       If AllTheTime.Left >= Screen.Width - 15 Then
  288.          AllTheTime.Left = AllTheTime.Tag
  289.       End If
  290. '
  291. 'Settings.SetFocus
  292. End Sub
  293.  
  294. Sub Form_KeyDown (KeyCode As Integer, Shift As Integer)
  295.     Select Case KeyCode
  296.         Case Alt_R      'Rotate
  297.             For I% = 0 To 4
  298.             If gOption3D1(I%) Then S% = I%
  299.             Next I%
  300.             gOption3D1((S% + 1) Mod 5) = True
  301.             gOption3D1(S%) = False
  302.             KeyCode = 0
  303.             Shift = 0
  304.             Call PositionATT
  305.  
  306.         Case Alt_T      'Turn off
  307. '            KeyCode = 0
  308. '            Shift = 0
  309. '            AllTheTime.Visible = Not AllTheTime.Visible
  310.    End Select
  311.  
  312. End Sub
  313.  
  314. Sub Form_KeyPress (KeyAscii As Integer)
  315.     If KeyAscii = Asc("X") Then
  316.        'DeleteMenus
  317.        FinalProcessing
  318.        End 'Program
  319.     End If
  320. End Sub
  321.  
  322. Sub Form_Load ()
  323. If hSubMenus <> 0 Then
  324.    MsgBox "Loading twice..."
  325.    End
  326. End If
  327.  
  328. SeasonDescArr$(0) = "Fall"
  329. SeasonDescArr$(1) = "Winter"
  330. SeasonDescArr$(2) = "Spring"
  331. SeasonDescArr$(3) = "Summer"
  332. MoonDescArr$(0) = "Full moon"
  333. MoonDescArr$(1) = "Waning, full moon"
  334. MoonDescArr$(2) = "Third quarter"
  335. MoonDescArr$(3) = "Waning, third quarter"
  336. MoonDescArr$(4) = "New moon"
  337. MoonDescArr$(5) = "Waxing, new moon"
  338. MoonDescArr$(6) = "First quarter"
  339. MoonDescArr$(7) = "Waxing, first quarter"
  340. TODDescArr$(0) = "morning"
  341. TODDescArr$(1) = "afternoon"
  342. TODDescArr$(2) = "evening"
  343. TODDescArr$(3) = "night"
  344.  
  345.  
  346. If GroupFauxCompilerDirective Then
  347.    Text1.LinkMode = 0
  348.    Text1.LinkTopic = "Progman|Progman"
  349.    Text1.LinkItem = "Groups"
  350.    Text1.LinkMode = 2
  351.    Text1.LinkRequest
  352.  
  353.    hGroupMenu = CreatePopUpMenu()
  354.    T% = AppendMenu(hMainMenu, MF_SEPARATOR, IDM_ITEMS, "-")
  355.    
  356.    Groups$ = Text1.Text
  357.    While Groups$ <> ""
  358.       cPos = InStr(Groups$, Chr(13))
  359.       OneGroup$ = Left$(Groups$, cPos - 1)
  360.       Groups$ = Mid$(Groups$, cPos + 2, 30000)
  361.       hSubMenus = hSubMenus + 1
  362.       ReDim Preserve hSubMenu(hSubMenus)
  363.       hSubMenu(hSubMenus) = CreatePopUpMenu()   'popup
  364.   
  365.       Text1.LinkItem = OneGroup$
  366.       Text1.LinkMode = 2
  367.       Text1.LinkRequest
  368.  
  369.       Progs$ = Text1.Text
  370.       FirstOne = True
  371.       While Progs$ <> ""
  372.          cPos = InStr(Progs$, Chr(13))
  373.          OneProg$ = Left$(Progs$, cPos - 1)
  374.          Progs$ = Mid$(Progs$, cPos + 2, 30000)
  375.          PName$ = Mid$(OneProg$, 2, 30000)
  376.          PName$ = Mid$(PName$, 1, InStr(PName$, Chr(34)) - 1)
  377.          If FirstOne Then
  378.             FirstOne = False
  379.          Else
  380.             T% = AppendMenu(hSubMenu(hSubMenus), MF_STRING, IDM_ITEMS + hSubMenus, PName$)
  381.          End If
  382.       Wend
  383.  
  384.       T% = AppendMenu(hGroupMenu, MF_POPUP, hSubMenu(hSubMenus), OneGroup$)
  385.    Wend
  386.  
  387. T% = AppendMenu(hMainMenu, MF_POPUP, hGroupMenu, "Groups...")
  388. End If
  389.  
  390. PrtActive.Picture = MoonSun.GraphicCell(20)
  391. PrtInActive.Picture = MoonSun.GraphicCell(21)
  392. PrtStatus.Picture = MoonSun.GraphicCell(21)
  393. StopWatch.Picture = MoonSun.GraphicCell(30)
  394. Delta.Picture = MoonSun.GraphicCell(47)
  395. Picture1.Picture = MoonSun.GraphicCell(23)
  396. End Sub
  397.  
  398. Sub Form_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  399. MStartX = X
  400. MStartY = Y
  401. StartLeft = Left
  402. StartTop = Top
  403. AllowFormToMove = True
  404. Moved = True
  405. LastClickX = X
  406.  
  407. If Shift <> 1 Then
  408.    'AutoRedraw = False   '1/15
  409. Else
  410.    'Beep
  411. End If
  412. End Sub
  413.  
  414. Sub Form_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  415. If AllowFormToMove = True Then
  416.         AllTheTime.Left = AllTheTime.Left + (X - MStartX)
  417.         AllTheTime.Top = AllTheTime.Top + (Y - MStartY)
  418. End If
  419.  
  420. End Sub
  421.  
  422. Sub Form_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  423.  
  424. AllowFormToMove = False
  425. 'AutoRedraw = True '1/15
  426. If Left = StartLeft And Top = StartTop Then
  427.    Moved = False
  428. Else
  429.    PosLeft = AllTheTime.Left
  430.    PosTop = AllTheTime.Top
  431.    gOption3D1(4) = True
  432.    For I% = 0 To 3
  433.       gOption3D1(I%) = False
  434.    Next I%
  435.    Call PositionATT
  436. End If
  437. End Sub
  438.  
  439. Sub Form_Paint ()
  440. '
  441. End Sub
  442.  
  443. Sub Form_QueryUnload (Cancel As Integer, UnloadMode As Integer)
  444. If UnloadMode = 3 Then
  445.    'DeleteMenus
  446.    FinalProcessing
  447.    End 'Program
  448. End If
  449. End Sub
  450.  
  451. Sub Form_Resize ()
  452. 'SavedVis = Visible
  453. 'Visible = False
  454. If Resizing Then Exit Sub
  455. Resizing = True
  456. If WindowState = 1 Then
  457.    Exit Sub
  458. End If
  459. Call SetTime
  460. Call SetSize
  461. Call PositionATT
  462. 'Visible = SavedVis
  463. Resizing = False
  464. End Sub
  465.  
  466. Sub MoonPic_DblClick ()
  467. SoundABorted = True
  468. MoonList.Show 1
  469. End Sub
  470.  
  471. Sub MoonPic_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  472. 'Call Form_MouseDown(Button, Shift, X, Y)
  473. 'Form1.Label1.FontName = AllTheTime.FontName
  474. 'Form1.Label1.ForeColor = AllTheTime.ForeColor
  475. 'If Form1.Label1.ForeColor = Form1.Label1.BackColor Then
  476. '   Form1.Label1.BackColor = AllTheTime.BackColor
  477. 'End If
  478. 'Form1.Label1.FontSize = AllTheTime.FontSize
  479. 'Form1.Label1.FontBold = AllTheTime.FontBold
  480. 'Form1.Label1.FontItalic = AllTheTime.FontItalic
  481. Form1.Label1.AutoSize = True
  482. If gMoonExact% Then gWaxDesc$ = ""
  483. Form1.Label1.Caption = " " + (gWaxDesc$) + MoonDesc$ + " " + SavedDat$ + " "
  484. Form1.Label1.AutoSize = False
  485. Form1.Label1.Width = Form1.Label1.Width + 60
  486. Form1.Label1.Height = Form1.Label1.Height + 60
  487. Form1.Width = Form1.Label1.Width
  488. Form1.Height = Form1.Label1.Height
  489. Form1.Label1.Left = 0
  490. Form1.Label1.Top = 0 + 15
  491. Form1.Top = AllTheTime.Top + Y - Form1.Height
  492. Form1.Left = AllTheTime.Left + MoonPic.Left + X
  493. If Form1.Top < 0 Then Form1.Top = 0
  494. If Form1.Left + Form1.Width > Screen.Width Then Form1.Left = Screen.Width - Form1.Width
  495.  
  496. 'Form1.ZOrder 0
  497. Form1.Show
  498. wOn_Top% = SetWindowPos(Form1.hWnd, -1, 0, 0, 0, 0, wFlags = &H2 Or &H1 Or &H40 Or &H10)
  499. End Sub
  500.  
  501. Sub MoonPic_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  502. Call Form_MouseMove(Button, Shift, X, Y)
  503.  
  504. End Sub
  505.  
  506. Sub MoonPic_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  507. 'Call Form_MouseUp(Button, Shift, X, Y)
  508. Unload Form1
  509.  
  510. End Sub
  511.  
  512. Sub Option3D1_Click (Index As Integer, Value As Integer)
  513. If gPositioning Then Exit Sub
  514. For I% = 0 To 4: gOption3D1(I%) = 0: Next I%
  515. gOption3D1(Index) = Value
  516. Call PositionATT
  517.  
  518. End Sub
  519.  
  520. Sub Picture1_DblClick ()
  521. Call PictureMenuMouseDown(0, 0, 0, 0)
  522. SoundABorted = True
  523. 'DblCFlag% = True
  524. End Sub
  525.  
  526. Sub Picture1_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  527. Call PictureMenuMouseDown(Button, Shift, X, Y)
  528. End Sub
  529.  
  530. Sub PrtActive_Click ()
  531. SoundABorted = True
  532. End Sub
  533.  
  534. Sub PrtActive_DblClick ()
  535. 'On Local Error Resume Next
  536. T% = Shell("PRINTMAN", 1)
  537. 'AppActivate "Print Manager"
  538. 'hActive% = GetActiveWindow()                 ' pickup it's hWnd handle
  539. 'Call SwitchToThisWindow(hActive%, True)
  540. 'On Local Error GoTo 0
  541. End Sub
  542.  
  543. Sub PrtActive_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  544. Call Form_MouseDown(Button, Shift, X, Y)
  545. End Sub
  546.  
  547. Sub PrtActive_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  548. Call Form_MouseMove(Button, Shift, X, Y)
  549. End Sub
  550.  
  551. Sub PrtActive_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  552. Call Form_MouseUp(Button, Shift, X, Y)
  553. End Sub
  554.  
  555. Sub PrtInactive_Click ()
  556. SoundABorted = True
  557. End Sub
  558.  
  559. Sub PrtInactive_DblClick ()
  560. T% = Shell("PRINTMAN", 1)
  561.  
  562. End Sub
  563.  
  564. Sub PrtInactive_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  565. Call Form_MouseDown(Button, Shift, X, Y)
  566. PrtInActive.Picture = MoonSun.GraphicCell(20)
  567. End Sub
  568.  
  569. Sub PrtInactive_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  570. Call Form_MouseMove(Button, Shift, X, Y)
  571. End Sub
  572.  
  573. Sub PrtInactive_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  574. Call Form_MouseUp(Button, Shift, X, Y)
  575. PrtInActive.Picture = MoonSun.GraphicCell(21)
  576. End Sub
  577.  
  578. Sub SeasonPic_Click ()
  579. SoundABorted = True
  580. End Sub
  581.  
  582. Sub SeasonPic_DblClick ()
  583. SoundABorted = True
  584. 'DblCFlag% = True
  585. End Sub
  586.  
  587. Sub SeasonPic_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  588. 'Call Form_MouseDown(Button, Shift, x, Y)
  589. 'Form1.Label1.FontName = AllTheTime.FontName
  590. 'Form1.Label1.ForeColor = AllTheTime.ForeColor
  591. 'If Form1.Label1.ForeColor = Form1.Label1.BackColor Then
  592. '   Form1.Label1.BackColor = AllTheTime.BackColor
  593. 'End If
  594. 'Form1.Label1.FontSize = AllTheTime.FontSize
  595. 'Form1.Label1.FontBold = AllTheTime.FontBold
  596. 'Form1.Label1.FontItalic = AllTheTime.FontItalic
  597.  
  598. Form1.Label1.AutoSize = True
  599. Form1.Label1.Caption = " " + SeasonDesc$ + " " + TODDesc$ + " "
  600. Form1.Label1.AutoSize = False
  601. Form1.Label1.Width = Form1.Label1.Width + 60
  602. Form1.Label1.Height = Form1.Label1.Height + 60
  603. Form1.Width = Form1.Label1.Width
  604. Form1.Height = Form1.Label1.Height
  605. Form1.Label1.Left = 0
  606. Form1.Label1.Top = 0 + 15
  607.  
  608. Form1.Top = AllTheTime.Top + Y - Form1.Height
  609. Form1.Left = AllTheTime.Left + SeasonPic.Left + X - Form1.Label1.Width
  610. 'Form1.ZOrder 0
  611. If Form1.Top < 0 Then Form1.Top = 0
  612. If Form1.Left + Form1.Width > Screen.Width Then Form1.Left = Screen.Width - Form1.Width
  613. Form1.Show
  614. wOn_Top% = SetWindowPos(Form1.hWnd, -1, 0, 0, 0, 0, wFlags = &H2 Or &H1 Or &H40 Or &H10)
  615.  
  616. End Sub
  617.  
  618. Sub SeasonPic_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  619. Call Form_MouseMove(Button, Shift, X, Y)
  620. End Sub
  621.  
  622. Sub SeasonPic_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  623. 'Call Form_MouseUp(Button, Shift, x, Y)
  624. Unload Form1
  625.  
  626. End Sub
  627.  
  628. Sub StopWatch_Click ()
  629. SoundABorted = True
  630. End Sub
  631.  
  632. Sub StopWatch_DblClick ()
  633. SoundABorted = True
  634. 'DblCFlag% = True
  635. End Sub
  636.  
  637. Sub StopWatch_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  638. Call Form_MouseDown(Button, Shift, X, Y)
  639. If Button = 1 Then 'Left button
  640.    If gTimerRunning = 2 Then
  641.       'start timer
  642.       gTime = Time - (gStoppedTime - gTime)
  643.       StopWatch.Picture = MoonSun.GraphicCell(30)
  644.       LastTime& = 0
  645.       'FontChangedNotYetSized = True
  646.       gTimerRunning = 1
  647.    Else
  648.       'stop timer
  649.       gStoppedTime = Time
  650.       LastTime& = 0
  651.       StopWatch.Picture = MoonSun.GraphicCell(25)
  652.       gTimerRunning = 2
  653.    End If
  654. End If
  655. If Button = 2 Then
  656.       gTime = Time
  657.       gStoppedTime = Time
  658.       LastTime& = 0
  659. End If
  660.  
  661. Exit Sub
  662.  
  663. If (gTimerRunning = 0) Or (gTimerRunning = 2 And Button = 2) Then
  664.    If (gTimerRunning = 0) Then
  665.       gTime = Time
  666.    Else
  667.       gTime = Time - (gStoppedTime - gTime)
  668.    End If
  669.    gTimerRunning = 1
  670.    StopWatch.Picture = MoonSun.GraphicCell(26)
  671.    gStopPic = 0
  672.    LastTime& = 0
  673. Else
  674.    If gTimerRunning = 1 Then
  675.       gTimerRunning = 2
  676.       gStoppedTime = Time
  677.       LastTime& = 0
  678.       StopWatch.Picture = MoonSun.GraphicCell(25)
  679.    Else
  680.       StopWatch.Picture = MoonSun.GraphicCell(24)
  681.       gTimerRunning = 1 'was 0
  682.       gTime = 0
  683.       LastTime& = 0
  684.       FontChangedNotYetSized = True
  685.    End If
  686. End If
  687. End Sub
  688.  
  689. Sub StopWatch_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  690. Call Form_MouseMove(Button, Shift, X, Y)
  691.  
  692. End Sub
  693.  
  694. Sub StopWatch_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  695. Call Form_MouseUp(Button, Shift, X, Y)
  696.  
  697. End Sub
  698.  
  699.